package cc.wanforme.fsync.entity;

import cc.wanforme.fsync.entity.device.DeviceInfoVo;
import cc.wanforme.fsync.entity.po.ClientNode;
import cn.hutool.core.bean.BeanUtil;

import java.util.List;

/** 机器 */
public class ClientNodeInfo extends ClientNode {

    // 是否在线，连接成功
    private boolean online;
    // 对应的设备信息
    private List<DeviceInfoVo> deviceInfo;

    public ClientNodeInfo() {}

    public ClientNodeInfo(ClientNode node) {
//        this.setId(node.getId());
//        this.setName(node.getName());
//        this.setProtocol(node.getProtocol());
//        this.setHost(node.getHost());
//        this.setPort(node.getPort());
        BeanUtil.copyProperties(node, this);
    }


    public boolean isOnline() {
        return online;
    }

    public void setOnline(boolean online) {
        this.online = online;
    }

    public List<DeviceInfoVo> getDeviceInfo() {
        return deviceInfo;
    }

    public void setDeviceInfo(List<DeviceInfoVo> deviceInfo) {
        this.deviceInfo = deviceInfo;
    }


}
